import pygame, sys
from pygame.locals import *
# 参数
WIDTH = 960
HEIGHT = 720

backgroundColor = (200, 222, 222)       # 背景颜色
snackHeadColor = (160, 100, 100)        # 蛇头颜色
snackBodyColor = (100, 100, 100)        # 蛇身颜色
foodColor = (0, 150, 255)               # 食物颜色
lineColor = (0, 0, 0)                   # 线条颜色

scoreColor = (100, 100, 100)            # 分数字体颜色
scorePosition = [60, 20]                # 分数打印位置
scoreSize = 50                          # 分数字体大小

AuthorColor = (120, 120, 120)
AuthorSize = 20
AuthorPosition = [820, 700]

titleColor = (120, 0, 120)              # 标题字体颜色
titleSize = 100                         # 标题字体大小
titlePosition = [240, 150]              # 标题位置

startPageTextColor = (120, 120, 120)    # 开始界面字体颜色
highStartPageTextColor = (255, 215, 0)  # 开始界面高亮字体颜色
startPageTextSize = 80                  # 开始界面字体大小

tipSize = 20                            # 提示字体大小
tipPosition = [10, 700]                 # 提示位置

circleColor = (240, 80, 80)             # 页面上指示选择的红点
circleRadius = 10                       # 红点的半径

KSpeed = [90, 70, 50, 40, 30, 20, 10]   # 速度分级
KScore = [1, 2, 3, 4, 5, 6, 7]          # 分数分级

speedPageTitleColor = (184, 134, 11)    # 速度页面标题颜色
speedPageTitleSize = 80                 # 速度页面标题字体大小
speedPageTitlePosition = [150, 80]      # 速度页面标题位置
speedPageTextColor = (120, 120, 120)    # 速度页面字体颜色
highSpeedPageTextColor = (255, 215, 0)  # 字体颜色高亮 表示选择
speedPageTextSize = 50                  # 速度页面字体大小

snakerate = 0                           # 蛇当前的速度等级

scorePageTitleColor = (255, 0, 0)       # 分数页面标题颜色
scorePageTitleSize = 80                 # 分数页面标题字体大小
scorePageTitlePosition = [210, 80]      # 分数页面标题位置
scorePageNumberColor = (120, 120, 120)  # 分数页面页码颜色
scorePageNumberSize = 40                # 分数页面页码字体大小
scorePageNumberPosition = [700, 630]    # 分数页面页码位置

scorePageTipColor = (120, 120, 120)     # 分数页面提示颜色

scorePageFirstColor = (255, 99, 71)     # 分数排名颜色
scorePageSecondColor = (255, 127, 0)
scorePageThirdColor = (255, 165, 0)
scorePageTextColor = (255, 160, 122)
scorePageTextSize = 50                  # 分数排名字体大小

endPageTextColor = (218, 165, 32)
endPageTitleSize = 100
endPageTitlePosition = [240, 150]
endPageScoreSize = 80
endPageScorePosition = [250, 300]

ERRORColor = (200, 200, 200)            # 分数页面不存在分数时弹出的提示颜色
ERRORSize = 50                          # 字体大小
ERRORPosition = [80, 300]               # 字体位置

# 音乐
pygame.mixer.init()

startPageBGM = pygame.mixer.Sound("startpage.mp3")
playPageBGM = pygame.mixer.Sound("playpage.mp3")
foodBGM = pygame.mixer.Sound("food.mp3")
KeyBGM = pygame.mixer.Sound("key.mp3")
Channel1 = pygame.mixer.Channel(1)
Channel2 = pygame.mixer.Channel(2)
Channel3 = pygame.mixer.Channel(3)
Channel4 = pygame.mixer.Channel(4)